package jbpmguice.workflow;

import com.google.inject.Inject;
import jbpmguice.business.InjectableIf;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.node.DecisionHandler;


public class InjectableTestDecision implements DecisionHandler {

    private static final long serialVersionUID = 8969416010658830170L;
    private InjectableIf inj;

    @Inject
    public InjectableTestDecision(InjectableIf inj) {
        this.inj = inj;
    }

    public String decide(ExecutionContext executionContext) throws Exception {
        System.out.println(inj.helloWorld());
        return "yes";
    }

}
